Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

convert-gitmoji

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

convert-gitmoji

♻️ Convert strings to gitmojis

  • 0.1.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

convert-gitmoji

npm version npm downloads Github Actions CI License

Simple way to replace strings with gitmojis ♻️

Install


# Using npm
npm install convert-gitmoji

# Using yarn
yarn add convert-gitmoji

Usage

convert(content: string, withSpace?: boolean | "leading" | "trailing" | "both")

Convert all gitmojis in a string withSpace is default false, if true its sets a trailing (at the end of the string) whitespace after the converted gitmoji.

For more control, withSpace can also be set to leading for a whitespace before the string, trailing for a whitespace at the end of the string (same as true) or both to have the string surrounded by whitespaces.

// CommonJS
const { convert } = require("convert-gitmoji");

// ESM
import { convert } from "convert-gitmoji";

convert(':arrow_up: bump qs from 6.10.3 to 6.10.4 (xxx) - **helper:** :pencil:  Updated TSDoc (xxx)', true);

--> "⬆️ bump qs from 6.10.3 to 6.10.4 (xxx) - **helper:** ✏️ Updated TSDoc (xxx)"

convert("This:art:is on:fire:!")

--> "This🎨is on🔥!"

convert("This:art:is on:fire:!", "both")

--> "This 🎨 is on 🔥 !"

License

Published under MIT - Made with ❤️ by Conner Luka Bachmann

FAQs

Package last updated on 25 Jan 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc